package zisu.netty.practice.RPC.demo;

import zisu.netty.practice.RPC.utils.Serialization;

import java.util.Arrays;

/**
 * @Desc: ""
 * @Author: caixiang
 * @DATE: 2021/1/19 13:36
 */
public class Main {
    public static void main(String[] args) {
        User user = User.builder().id("1").age("20").name("cx").desc("desc1").build();
        Group group = Group.builder().user(user).id("1").name("分组1").build();
        byte[] data = Serialization.serialize(group);
        System.out.println("序列化后："+ Arrays.toString(data));
        Group deserialize = Serialization.deserialize(data, Group.class);
        System.out.println("反序列化后："+ deserialize);

    }
}
